MKCONF_DIR = ../mkconfig
LIBC_DIR = ../libc

CONF_FILES += config.mk
#CONF_FILES += $(TOPDIR)/../utility/configs/$(BOARD)/config.mk
CONF_FILES += $(TOPDIR)/../base/model/$(BOARD)/config/config.mk

include $(MKCONF_DIR)/compile.mk
include $(MKCONF_DIR)/config.mk

ifneq ($(MAKECMDGOALS),clean)
AUTOCONF_MK = $(BUILD_DIR)\autoconfig.mk
sinclude $(AUTOCONF_MK)
endif

CPPFLAGS += -I../utility/include
export CPPFLAGS

O_TARGET = build\sysapi.o

COBJS-y := sysdeps.o crypto.o modem.o
COBJS-$(CONFIG_PCI_KEY) += security.o
COBJS-$(CONFIG_AUDIO_NL) += audio_nl.o
COBJS-$(CONFIG_AUDIO_SY) += audio_sy.o
COBJS-$(CONFIG_PRINT) += printer.o





SOBJS-y :=

SRCS	:= $(COBJS-y:.o=.c) $(SOBJS-y:.o=.S)
OBJS	:= $(addprefix $(obj)/, $(COBJS-y) $(SOBJS-y))

$(O_TARGET): $(OBJS)
	@$(RM) $(O_TARGET)
	$(call cmd_link_o_target, $(OBJS))

lib: $(OBJTREE)\..\librxApi.a
$(OBJTREE)\..\librxApi.a: $(OBJS)
	@if exist $@ (@$(RM) $@)	
	$(E) Linking image $(notdir $@) 
	$(S) $(AR) $(ARFLAGS) $@ $(OBJS)

include $(MKCONF_DIR)/rules.mk
include $(MKCONF_DIR)/operation.mk
